<!DOCTYPE html>
<html lang="zh-CN" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title id="gameTitle"></title>
  <link rel="stylesheet" type="text/css" href="/lib/layui/css/layui.css">
  <link rel="stylesheet" type="text/css" href="/css/global.css">
</head>
<body>

<!--头部导航栏-->
<<div id="app">
  <!--头部导航栏-->
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <ul class="layui-nav">
        <li class="layui-nav-item"><a href="/pages/index.html"><img src="/img/gamehub.png"></a></li>
        <li class="layui-nav-item"><a></a></li>

        <li class="layui-btn layui-btn-radius layui-btn-primary">
          <a href="/pages/news.html">新闻</a>
        </li>
        <li class="layui-nav-item"><a></a></li>

        <li class="layui-btn layui-btn-radius layui-btn-primary">
          <a href="/pages/game.html">游戏</a>
        </li>
        <!--<li class="layui-nav-item"><a ></a></li>-->

        <!--<li class="layui-btn layui-btn-radius layui-btn-warm">-->
        <!--<a href="javascript:void(0);" class="login" >新闻</a>-->
        <!--</li>-->

      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <input type="text" ref="game" lay-verify="title" autocomplete="off" placeholder="文明" class="layui-input">
        </li>

        <li class="layui-nav-item"><a @click="gotoGame()"><img src="/img/search.png" style="cursor:pointer"></a></li>
        <span v-if="userName==null">
                <li class="layui-nav-item">
                    <a href="/pages/userLogin.html" target="_blank" class="login">登录</a>
                </li>

                <li class="layui-nav-item">
                    <a href="/pages/userRegiste.html" target="_blank" class="enroll">注册</a>
                </li>
                </span>
        <span v-if="userName!=null">
                <li class="layui-nav-item">
                    <a>{{userName}}</a>
                </li>

                <li class="layui-nav-item">
                    <a @click="logout()" style="cursor:pointer">退出</a>
                </li>
                </span>
      </ul>
    </div>
  </div>
</div>

<div class="layui-container" id="appGameDetail">
  <div class="layui-row">
    <!--    游戏图片展示-->
    <div class="layui-col-md8">
      <br><br><br>
      <img :src="gameCover" height="430px" width="750px">
      <br><br><br>
    </div>
    <div class="layui-col-md-offset1 layui-col-md3">

      <!--      游戏下载链接展示-->
      <!--      折叠控制在下方的JavaScript里-->
      <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
        <legend>下载链接</legend>
      </fieldset>
      <div class="layui-collapse" lay-accordion="">

        <!--        以下是手风琴折叠的子元素-->
        <div v-for="gameLink in gameLinkList">
          <div class="layui-colla-item">
            <h2 class="layui-colla-title">{{gameLink.gameplatform}}</h2>
            <div class="layui-colla-content layui-show">
              <div class="layui-row"><p>{{gameLink.gameurl}}</p></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="layui-row">

    <!--    游戏描述-->
    <div class="layui-col-md8">
      <fieldset class="layui-elem-field">
        <legend>游戏描述</legend>
        <div class="layui-field-box" style="white-space:normal">
          {{gameDetail.innerhtml}}
        </div>
      </fieldset>
    </div>

    <!--    攻略列表-->
    <div class="layui-col-md-offset1 layui-col-md3">

      <!--        以下是手风琴折叠的子元素-->
      <div class="layui-card">
        <div class="layui-card-header"><h4>游戏攻略</h4></div>
        <div class="layui-card-body">
          <div v-for="gamestrategy in gameStrategiesList">
            <a>{{gamestrategy[0].title}}</a>
          </div>
        </div>
      </div>

    </div>

    <!--  新的一行-->
    <!--  嵌套进卡片的分页游戏评测-->
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
      <legend>游戏评测</legend>
    </fieldset>
    <div class="layui-card">
      <div class="layui-card-body">

        <div class="layui-row">
          <ul id="gameReviews"></ul>
        </div>
        <div class="layui-row">
          <center>
            <div id="gameReviewPagination"></div>
          </center>
        </div>
      </div>

    </div>
  </div>

  <br><br><br>
  <!--  富文本编辑器CKeditor-->
  <div class="layui-row">
    <div class="layui-col-md12">
      <form class="layui-form">

        <!--        编辑器本体-->
        <textarea id="editor" name="content" v-model="commentText" style="height: 150px; width: 1140px"></textarea>

        <!--        提交按钮-->
        <div class="layui-form-item">
          <div class="layui-input-block">
            <center>
              <button type="submit" class="layui-btn layui-btn-warm layui-btn-radius" @click.prevent="submit" lay-filter="demo1">立即提交</button>
            </center>
          </div>
        </div>

      </form>
    </div>
  </div>

  <!--  评论区-->
  <div class="layui-row">
    <div class="layui-col-md12">

      <div class="layui-card">
        <div class="layui-row">
          <div class="layui-col-md12">
            <ul id="gameComments">

            </ul>
          </div>
        </div>

        <div class="layui-row">
          <div class="layui-col-md12">
            <center>
              <div id="gameCommentPagination"></div>
            </center>
          </div>
        </div>

      </div>
    </div>
  </div>
</div>

<!--<script src="/lib/ckeditor/ckeditor.js"></script>-->
<script src="/lib/js/vue.js"></script>
<script src="/lib/js/axios.min.js"></script>
<script src="/lib/layui/layui.js"></script>
<script src="/js/index.js"></script>
<script src="/js/gameDetail.js"></script>
</body>
</html>